/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.designpatterns.creational.abstractfactory;

import java.util.Date;

/**
 *
 * @author BassonCJ
 */
public class AbstractFactory {
    public static  AbstractFactory abstractFactory = null;

    private AbstractFactory() {
    }    
    
    public synchronized static AbstractFactory getInstance(){
        if(abstractFactory == null){
            abstractFactory = new AbstractFactory();
        }
        return abstractFactory;
    }
    
    public Date getDate(){
        return new Date();
    }
    
    public AnimalFactory getAnimalFactory(){
        return new AnimalFactory();
    }
    
    public PersonFactory getPersonFactory(){
        return new PersonFactory();
    }
}
